clear;
clc;
close all;
programFiles = pwd;


restoredefaultpath;
addpath(strcat(programFiles,'\regressionfunctions'))


 %this is a completely random dataset, the values have no meaning and therfore output based on this is random too 
load('pseudo_data.mat'); 
merged_fm= pseudo_merged;

check = exist('ff_fact','var');
if check == 0
    disp('running code to generate Table 5 and Panel A of Table 6')
    ff_fact = [];

    %if ff_fact missing, the results for Table 5 and first panel of Table 6
    %will be generate
end


cd(programFiles)
qtrdummy = 1;
allvarscalculated = 1;
runanalysis(merged_fm,allvarscalculated,qtrdummy,programFiles,ff_fact);